"""API routes package."""
from flask_restx import Api


def register_routes(api: Api):
    """Register all API namespaces.
    
    Args:
        api: Flask-RESTX API instance
    """
    from app.routes.auth import api as auth_ns
    from app.routes.user import api as user_ns
    from app.routes.route import api as route_ns
    from app.routes.session import api as session_ns
    from app.routes.poi import api as poi_ns
    from app.routes.weather import api as weather_ns
    from app.routes.music import api as music_ns
    from app.routes.api import api as unified_api_ns  # 统一API
    
    api.add_namespace(auth_ns, path='/api/auth')
    api.add_namespace(user_ns, path='/api/user')
    api.add_namespace(route_ns, path='/api/route')
    api.add_namespace(session_ns, path='/api/session')
    api.add_namespace(poi_ns, path='/api/poi')
    api.add_namespace(weather_ns, path='/api/weather')
    api.add_namespace(music_ns, path='/api/music')
    api.add_namespace(unified_api_ns, path='/api/v1')  # 统一API v1
